<script setup>
const [model,modifies] = defineModel({
    set(value){
        if(modifies.abc){
            return value.toUpperCase();
        }
        return value;
    }
})
// const model = defineModel({default:10})
// const model = defineModel({required:true})
const foo = defineModel('foo')
// const bar = defineModel('bar')
const [bar,barModifies] = defineModel('bar')
console.log("bar=>",bar);
console.log("barModifies=>",barModifies);
if(barModifies.abc){
    console.log("bar.value=>",bar.value);
    bar.value = bar.value.toUpperCase();
}

</script>

<template>
<div>
    <h1>我是子组件</h1>
  <!-- <button @click="model++">{{ model }}</button> -->
  <button >model==>  {{ model }}</button>
   <!-- <input type="text" v-model="foo" >
   <input type="text" v-model="bar"> -->
   <input type="text" v-model="model">
</div>
</template>

<style scoped>
</style>